package com.winning.ds.common.jdbc.sql;

/**
 * @作者：caopengfei
 * @时间：2020/9/7
 */
public enum DBType {
    /**SQl SERVER **/
    SQLSERVER("SQLSERVER",
            "com.microsoft.sqlserver.jdbc.SQLServerDriver",
            "SELECT 1 ",
            "SqlServerAdaper"),
    /** ORACLE **/
    ORACLE("ORACLE",
            "oracle.jdbc.driver.OracleDriver",
            "SELECT 1 FROM DUAL",
            "OracleAdaper"),
    /** MYSQL **/
    MYSQL("MYSQL",
            "com.mysql.jdbc.Driver",
            "SELECT 1 ",
            "MysqlAdaper"),
    /** GREENPLUM **/
    GREENPLUM("GREENPLUM",
            "org.postgresql.Driver",
            "SELECT 1 ",
            "GreenplumAdaper"),
    /** POSTGRESQL **/
    POSTGRESQL("POSTGRESQL",
            "org.postgresql.Driver",
            "SELECT 1 ",
            "PostgresqlAdaper"),
    /** DAMENG **/
    DAMENG("DAMENG",
            "dm.jdbc.driver.DmDriver",
            "SELECT 1 FROM DUAL  ",
            "DaMengAdaper"),
    /** HSQLFB **/
    HSQL("HSQLDB",
            "org.hsqldb.jdbcDriver",
            "select 1 from RUN_JOB_HISTORY ",
            "HsqlAdaper");

    private String dbName;
    private String clazz;
    private String driverClass;
    private String testSql;

    DBType(String dbName,  String driverClass, String testSql,String clazz) {
        this.dbName = dbName;
        this.clazz = clazz;
        this.driverClass = driverClass;
        this.testSql = testSql;
    }

    public String dbName() {
        return dbName;
    }

    public String driverClass() {
        return driverClass;
    }

    public String testSql() {
        return testSql;
    }
    public String clazz() {
        return clazz;
    }
}
